{extend name="public/base"/}
 {block name="content"}

  <section class="content">
           <div class="row">
	<div class="col-xs-12">	
		<div class="box">
			<div class="box-header" style="zoom:1;overflow: hidden;">
				<h3 class="box-title" style="float:left;margin-right:10px;">
				<a href="{:U('GetDb/index')}" class="btn btn-primary">数据库备份</a>
				</h3>
				 <h3 class="box-title" style="float:left;margin-right:10px;">
				<a href="{:U('GetDb/index')}" class="btn btn-primary">数据库还原</a>
				</h3> 
				
			</div>
			<!-- /.box-header -->
			<div class="box-body">
				<table class="table table-bordered table-hover">
				<!-- 列表头部 -->
				<thead>
				<tr>
					<th>ID</th>
					<th>文件名</th>
					<th>备份时间</th>
					<th>文件大小</th>
					<th>操作</th>
				</tr>
				</thead>
				<!-- 列表头部 -->
				
				<!-- 循环列表 -->
				 {notempty  name="lists"}
				{foreach name="lists" key="key" item="row"}
				{if condition="$key gt 1"}
				<tbody style="border:none">	
				<tr id="lista">
					<td>{$key-1}</td>
					<td>{$row}</td>
					<td>{$row|getfiletime=$datadir}</td>
					<td>{$row|getfilesize=$datadir}</td>
					<td>
		<a href="{:U('GetDb/down',array('name'=>$row))}" class="btn btn-primary btn-xs">下载</a>
    <a onclick="return confirm('确定将数据库还原到当前备份吗？')"href="{:U('GetDb/restore',array('name'=>$row))}" class="btn btn-success btn-xs">还原</a>
	<a onclick="return confirm('确定删除该备份文件吗')"href="{:U('GetDb/del',array('name'=>$row))}" class="btn btn-info btn-xs">删除</a>
					
					</td>
				</tr>    
				</tbody>
				 {/if}
				 {/foreach}	
               {else/}	
			   <tr><td colspan="7">没有找到相关数据。</td></tr>
               {/notempty}			   
				<!-- 循环列表 END -->
				</table>
				 <a class="btn btn-primary" href ="{:U('GetDb/backup')}">备份</a>
			</div>
			
		</div>
	</div>
</div>

 
			</section>
 {/block}